##FROM registry.cn-hangzhou.aliyuncs.com/marmot/phpfpm-7.0
##COPY ./sources.list /etc/apt/sources.list
###RUN apt-get update \
###手动安装依赖
##&& apt-get install -y libmemcached-dev zlib1g-dev \
##&& apt-get install -y php-devel \
### 安装需要的扩展
##&& pecl install memcached-2.2.0 \
### 启用扩展
##&& docker-php-ext-enable memcached
##&& docker-php-ext-enable
##&& docker-php-ext-install 

##使用pecl或者docker-php-ext-install 安装
##使用docker-php-ext-enable memcached 运行
##&& pecl install memcached-2.2.0 \
### 启用扩展
##&& docker-php-ext-enable memcached


FROM php:7.2-fpm
COPY ./sources.list /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev \
&& docker-php-ext-install -j$(nproc) iconv \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd